Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 3 - QuickDraw 3D Objects / QuickDraw 3D Objects Reference
Application-Defined Routines /


TQ3MetaHandler

You can define an object metahandler to specify methods for custom object types or custom element types.

typedef TQ3FunctionPointer (*TQ3MetaHandler) (
TQ3MethodType methodType);
methodType
A method type.
DESCRIPTION
Your TQ3MetaHandler function should return a function pointer (a value of type TQ3FunctionPointer) to the custom method whose type is specified by the methodType parameter. If you do not define a method of the specified type, your metahandler should return the value NULL.

In general, your metahandler should contain a switch statement that branches on the methodType parameter. QuickDraw 3D calls your metahandler repeatedly to build a method table when you first pass it to a QuickDraw 3D routine. Once QuickDraw 3D has finished building the method table, your metahandler is never called again. (When any one of your custom methods is called, you can be certain that your metahandler will not be called again.)

SEE ALSO
See "Defining an Object Metahandler," beginning on page 3-15 for a sample metahandler.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996